package com.dailyblue.java.standard.interview.offer1;

import java.math.BigDecimal;

public class App {

    public static void a(){
        CalculateValue value = new CalculateMethod1();
        BigDecimal weight = BigDecimal.valueOf(27.0);
        BigDecimal price = BigDecimal.valueOf(9.4);
        BigDecimal result = value.calculateFruitValue(weight,price);
        System.out.println(result);
    }
    public static void b(){
        CalculateValue value = new CalculateMethod2();
        BigDecimal weight = BigDecimal.valueOf(21.0);
        BigDecimal price = BigDecimal.valueOf(4);
        BigDecimal result = value.calculateFruitValue(weight,price);
        System.out.println(result);
    }
    public static void main(String[] args) {
        b();
    }
}
